<template>
  <view class="float-icon">
    <button open-type="contact" class="icon">
      <image src="/static/images/service.png" mode="widthFix"></image>
    </button>
    <button open-type="share" class="icon">
      <image src="/static/images/share.png" mode="widthFix"></image>
    </button>
  </view>
</template>

<script>
export default {
  name: 'floatIcon',
  props: {},
  data() {
    return {}
  },
  mounted() {},
  methods: {
    // 切换 tab 的方法
    switchTab(url) {
      uni.switchTab({
        url,
      })
    },
  },
  watch: {},
}
</script>

<style lang="scss" scoped>
.float-icon {
  position: fixed;
  right: 30rpx;
  bottom: 250rpx;
  .icon {
    margin-bottom: 22rpx;
    font-size: 0;
    background: transparent;
    padding: 0;
    image {
      width: 100rpx;
      height: 100rpx;
    }
  }
}
</style>
